import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/info/bookmark/base/list',
    method: 'get',
    params: query
  })
}

export function fetchBookmark(id) {
  return request({
    url: '/info/bookmark/' + id,
    method: 'get'
  })
}

export function createBookmark(data) {
  return request({
    url: '/info/bookmark/base',
    method: 'post',
    data
  })
}

export function updateBookmark(data) {
  return request({
    url: '/info/bookmark/base',
    method: 'put',
    data
  })
}

export function createOrUpdateBookmark(data) {
  return request({
    url: '/info/bookmark/base/save-or-update',
    method: 'post',
    data
  })
}

export function deleteBookmark(id) {
  return request({
    url: '/info/bookmark/base/' + id,
    method: 'delete'
  })
}
